package DataStructure.linear;


public class StakTest {
    public static void main(String[] args) {
        //创建站对象
        Stack<String> stack = new Stack();
        stack.push("柳淇");
        stack.push("bitch");
        stack.push("老婆");
        stack.push("爱你");
        for (String item : stack) {
            System.out.println(item);
        }

        String result = stack.pop();
        System.out.println("弹出元素:"+result);
        System.out.println("剩余元素个数:"+stack.size());
    }
}
